import json

from applications.extensions import ma
from marshmallow import fields


# 情绪课程models的序列化类
class CourseInfoSchema(ma.Schema):
    course_id = fields.Integer()
    course_name = fields.Str()
    course_detail = fields.Str()
    course_type = fields.Str()
    video_path = fields.Str()
    icon_path = fields.Str()

# 心理课程moedls的序列化类
class CourseInfoMenSchema(ma.Schema):
    course_id = fields.Integer()
    course_name = fields.Str()
    course_detail = fields.Str()
    course_type = fields.Str()
    video_path = fields.Str()
    icon_path = fields.Str()

class ActionresponseSchema(ma.Schema):
    course_id = fields.Integer()
    course_name = fields.Str()
    course_description = fields.Str()
    course_length = fields.Str()
    course_loadtime = fields.DateTime()
    course_updatetime = fields.DateTime()
    course_path = fields.Str()
    icon_path = fields.Str()

class StandardSchema(ma.Schema):
    course_id = fields.Integer()
    course_name = fields.Str()
    course_description = fields.Str()
    course_loadtime = fields.DateTime()
    course_updatetime = fields.DateTime()
    course_path = fields.Str()
    icon_path = fields.Str()

class ActionSchema(ma.Schema):
    course_id = fields.Integer()
    action_id = fields.Integer()
    action_name = fields.Str()
    action_description = fields.Str()
    action_path = fields.Str()
    action_length = fields.Integer()
    action_loadtime = fields.DateTime()
    action_updatetime = fields.DateTime()
    icon_path = fields.Str()
    skeleton_path = fields.Str()